package com.jichaoyun.controller;



import com.jichaoyun.common.model.PagedResult;
import com.jichaoyun.common.model.Result;
import com.jichaoyun.model.vo.FaultFormVo;
import com.jichaoyun.model.vo.FaultParaVo;
import com.jichaoyun.service.impl.FaultServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = {"故障处理接口"})
@RequestMapping("/sys/FaultHandle")
public class FaultController {

    @Autowired
    private FaultServiceImpl faultService;


    @ApiOperation(value = "按照条件查询所有的接口",notes = "" +
            "")
    @GetMapping("/getMenuListPage")
    public Result<PagedResult> getMenuListPage(FaultParaVo faultParaVo){

       PagedResult pagedResult =   faultService.getMenuListPage(faultParaVo);

        return Result.success(pagedResult);
    }


    @ApiOperation(value = "获取故障的通知信息")
    @GetMapping("/getFaultInformList")
    public Result<List<FaultFormVo>> getFaultInformList(){

        List<FaultFormVo> res =   faultService.getFaultInformList();

        return Result.success(res);
    }
}
